package org.aiforum.web.action;

import org.aiforum.common.Response;
import org.aiforum.domain.User;
import org.aiforum.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;

/*
 * 处理验证用户名是否被占用的ajax函数
 */
public class UserAjaxAction {
  
	//创建请求对象
	private User user=new User();
	
	 //创建业务接口对象
    @Autowired
    private  UserService userService;
	
	//创建响应对象
	
	private Response response;
	
	public String checkAccount(){
		//调用用户业务接口执行检查
		response=userService.checkAccount(user);
		return "success";
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Response getResponse() {
		return response;
	}

	public void setResponse(Response response) {
		this.response = response;
	}

	
	
}
